/*
 * Copyright (C) 2021 Huawei Device Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package iamutkarshtiwari.github.io.ananas.editimage.fragment.crop;


import iamutkarshtiwari.github.io.ananas.ResourceTable;

/**
 * enum class RatioText constructor(@StringRes val ratioTextId: Int, val aspectRatio: AspectRatio) {
 * FREE(R.string.iamutkarshtiwari_github_io_ananas_free_size, AspectRatio()),
 * FIT_IMAGE(R.string.iamutkarshtiwari_github_io_ananas_fit_image, AspectRatio(-1, -1)),
 * SQUARE(R.string.iamutkarshtiwari_github_io_ananas_square, AspectRatio(1, 1)),
 * RATIO_3_4(R.string.iamutkarshtiwari_github_io_ananas_ratio3_4, AspectRatio(3, 4)),
 * RATIO_4_3(R.string.iamutkarshtiwari_github_io_ananas_ratio4_3, AspectRatio(4, 3)),
 * RATIO_9_16(R.string.iamutkarshtiwari_github_io_ananas_ratio9_16, AspectRatio(9, 16)),
 * RATIO_16_9(R.string.iamutkarshtiwari_github_io_ananas_ratio16_9, AspectRatio(16, 9))
 * }
 */

public enum RatioText {

    FREE(ResourceTable.String_iamutkarshtiwari_github_io_ananas_free_size, new AspectRatio()),
    FIT_IMAGE(ResourceTable.String_iamutkarshtiwari_github_io_ananas_fit_image, new AspectRatio(-1, -1)),
    SQUARE(ResourceTable.String_iamutkarshtiwari_github_io_ananas_square, new AspectRatio(1, 1)),
    RATIO_3_4(ResourceTable.String_iamutkarshtiwari_github_io_ananas_ratio3_4, new AspectRatio(3, 4)),
    RATIO_4_3(ResourceTable.String_iamutkarshtiwari_github_io_ananas_ratio4_3, new AspectRatio(4, 3)),
    RATIO_9_16(ResourceTable.String_iamutkarshtiwari_github_io_ananas_ratio9_16, new AspectRatio(9, 16)),
    RATIO_16_9(ResourceTable.String_iamutkarshtiwari_github_io_ananas_ratio16_9, new AspectRatio(16, 9));

    private int ratioTextId;
    private AspectRatio aspectRatio;

    /**
     * 获取字符串资源ID
     *
     * @return id
     */
    public int getRatioTextId() {
        return ratioTextId;
    }

    /**
     * 获取AspectRatio
     *
     * @return AspectRatio对象
     */
    public AspectRatio getAspectRatio() {
        return aspectRatio;
    }

    RatioText(int ratioTextId, AspectRatio aspectRatio) {
        this.ratioTextId = ratioTextId;
        this.aspectRatio = aspectRatio;
    }
}



